import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/index'
import Shop from '@/components/shop'
import User from '@/components/user'
import Login from '@/components/login'
import Reg from '@/components/reg'
import orderlist from '@/components/orderlist'
import shopcar from '@/components/shopcar'
import goods from '@/components/goods'
import homeCategorySearch from '@/components/homeCategorySearch'
import jq from "jquery";
Vue.prototype.$jq=jq
Vue.use(Router)
export default new Router({
    routes: [
        {
            path:'/',
            redirect:'/index'
        },
        {
            path:'/index',
            component:Index
        },
        {
            path:'/shop/:shopid',
            name:'shop',
            component:Shop,
            props:true,
        },
        {
            path:'/user',
            component:User,
        },
        {
            path:'/login',
            component:Login,
        },
        {
            path:'/reg',
            component:Reg,
        },
        {
            path:'/orderlist',
            component:orderlist,
        },
        {
            path:'/shopcar',
            component:shopcar,
        },
        {
            path:'/goods',
            component:goods,
        },
        {
            path:'/homeCategorySearch',
            component:homeCategorySearch,
        },
    ]
})
